﻿ IF OBJECT_ID('up_MapHtml_AssetXmissionStructure') IS not NULL
DROP PROC up_MapHtml_AssetXmissionStructure

GO

create proc up_MapHtml_AssetXmissionStructure (@id int) as

/*
	by: jerry nixon
	on: march 09
	to: select google earth balloon html for a xmission structure
*/

-- return either the record value in the table or the function result if record value is null

proc [dbo].[up_MapHtml_AssetXmissionStructure] (@id int) as
                  
/*
	by: jerry nixon
	on: march 09
	to: select google earth balloon html for a xmission structure
*/

-- return either the record value in the table or the function result if record value is null

select dbo.fn_MapHTML_AssetXmissionStructure3(@Id)

/*
Old version
select 
	IsNull(MapHTML, dbo.fn_MapHTML_AssetXmissionStructure2(tb_Utility_Asset_XMissionStructures.Utility_Asset_XMissionStructureId))
from 
	tb_Utility_Asset_XMissionStructures
where 
	tb_Utility_Asset_XMissionStructures.Utility_Asset_XMissionStructureId = @Id
*/

GO

--exec up_MapHtml_AssetXmissionStructure 41